{# Logo link generation -#}
{% if not theme_logo.get("link") %}
  {% set href = pathto(root_doc) %}
{% elif hasdoc(theme_logo.get("link")) %}
  {% set href = pathto(theme_logo.get("link")) %} {# internal page #}
{% else %}
  {% set href = theme_logo.get("link") %} {# external url #}
{% endif %}

{#- Logo HTML and image #}
<a class="navbar-brand logo" href="{{ href }}">
  {{ theme_logo["svg"] }}
</a>
